/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.


See LICENSE and AUTHORS for more information.
*/

#ifndef IDENTITY_H
#define IDENTITY_H

#include <QObject>

class Identity : public QObject
{
    Q_OBJECT
public:
    Identity(int id=-1, QString nick="diChatter", QString realname="diChat-User",
                   QString awaymsg="I'm away", QString quitmsg="I'm using diChat!",
                   bool away=false, bool autoaway=true);
    virtual ~Identity() {}

    QString getNickname();
    QString getRealname();
    QString getAwayMessage();
    QString getQuitMessage();
    bool isAway();
    bool isAutoaway();
    void setAway(bool value);
    void setAutoaway(bool value);
    void sync(); // sync with database, in case of user changes
private:
    int id;
    QString nickname;
    QString realname;
    QString awaymsg;
    QString quitmsg;
    bool away;
    bool autoaway;
};

#endif // IDENTITY_H
